package com.wust.demo1.util;

import java.util.Random;

public class RandomUtil {
	public static final String allChar = "0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
	public static String generateString(int length){
		StringBuffer sb = new StringBuffer();
		Random random = new Random();
		for(int i = 0; i < length; i++){
			sb.append(allChar.charAt(random.nextInt(allChar.length())));
		}
		return sb.toString();
	}
}
